﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="RFIDScanHistory" targetNamespace="http://tempuri.org/RFIDScanHistory.xsd" xmlns:mstns="http://tempuri.org/RFIDScanHistory.xsd" xmlns="http://tempuri.org/RFIDScanHistory.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="MySettings" AppSettingsPropertyName="atsConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="atsConnectionString (MySettings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ATS.ReaderSynch._3._5.MySettings.GlobalReference.Default.atsConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="RFIDScanHistoryTableAdapter" GeneratorDataComponentClassName="RFIDScanHistoryTableAdapter" Name="RFIDScanHistory" UserDataComponentName="RFIDScanHistoryTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="atsConnectionString (MySettings)" DbObjectName="ats.dbo.RFIDScanHistory" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="GetData">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [RFIDScanHistory] WHERE (([RFIDNum] = @Original_RFIDNum) AND ([DateScanned] = @Original_DateScanned) AND ((@IsNull_AssetNo = 1 AND [AssetNo] IS NULL) OR ([AssetNo] = @Original_AssetNo)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_AssetNo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_AssetNo" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [RFIDScanHistory] ([RFIDNum], [DateScanned], [AssetNo]) VALUES (@RFIDNum, @DateScanned, @AssetNo);
SELECT RFIDNum, DateScanned, AssetNo FROM RFIDScanHistory WHERE (DateScanned = @DateScanned) AND (RFIDNum = @RFIDNum)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@AssetNo" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     RFIDScanHistory.*
FROM         RFIDScanHistory</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [RFIDScanHistory] SET [RFIDNum] = @RFIDNum, [DateScanned] = @DateScanned, [AssetNo] = @AssetNo WHERE (([RFIDNum] = @Original_RFIDNum) AND ([DateScanned] = @Original_DateScanned) AND ((@IsNull_AssetNo = 1 AND [AssetNo] IS NULL) OR ([AssetNo] = @Original_AssetNo)));
SELECT RFIDNum, DateScanned, AssetNo FROM RFIDScanHistory WHERE (DateScanned = @DateScanned) AND (RFIDNum = @RFIDNum)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@AssetNo" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_AssetNo" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_AssetNo" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="AssetNo" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="RFIDNum" DataSetColumn="RFIDNum" />
              <Mapping SourceColumn="DateScanned" DataSetColumn="DateScanned" />
              <Mapping SourceColumn="AssetNo" DataSetColumn="AssetNo" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="atsConnectionString (MySettings)" DbObjectName="ats.dbo.RFIDScanHistory" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByRFIDNUMandSCANDATE" GetMethodModifier="Public" GetMethodName="GetDataByRFIDNUMandSCANDATE" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataByRFIDNUMandSCANDATE" UserSourceName="GetDataByRFIDNUMandSCANDATE">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     RFIDNum, DateScanned, AssetNo
FROM         RFIDScanHistory
WHERE     (RFIDNum = @RFIDNum) AND (DateScanned = @DateScanned)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="RFIDNum" ColumnName="RFIDNum" DataSourceName="ats.dbo.RFIDScanHistory" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="DateScanned" ColumnName="DateScanned" DataSourceName="ats.dbo.RFIDScanHistory" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="atsConnectionString (MySettings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="InsertScanHistory" Modifier="Public" Name="InsertScanHistory" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="InsertScanHistory">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>INSERT INTO [RFIDScanHistory] ([RFIDNum], [DateScanned]) VALUES (@RFIDNum, @DateScanned)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="RFIDNum" ColumnName="RFIDNum" DataSourceName="ats.dbo.RFIDScanHistory" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@RFIDNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="RFIDNum" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="DateScanned" ColumnName="DateScanned" DataSourceName="ats.dbo.RFIDScanHistory" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DateScanned" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="DateScanned" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="RFIDScanHistory" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="RFIDScanHistory" msprop:Generator_UserDSName="RFIDScanHistory">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="RFIDScanHistory" msprop:Generator_TableClassName="RFIDScanHistoryDataTable" msprop:Generator_TableVarName="tableRFIDScanHistory" msprop:Generator_TablePropName="_RFIDScanHistory" msprop:Generator_RowDeletingName="RFIDScanHistoryRowDeleting" msprop:Generator_UserTableName="RFIDScanHistory" msprop:Generator_RowChangingName="RFIDScanHistoryRowChanging" msprop:Generator_RowEvHandlerName="RFIDScanHistoryRowChangeEventHandler" msprop:Generator_RowDeletedName="RFIDScanHistoryRowDeleted" msprop:Generator_RowEvArgName="RFIDScanHistoryRowChangeEvent" msprop:Generator_RowChangedName="RFIDScanHistoryRowChanged" msprop:Generator_RowClassName="RFIDScanHistoryRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="RFIDNum" msprop:Generator_ColumnVarNameInTable="columnRFIDNum" msprop:Generator_ColumnPropNameInRow="RFIDNum" msprop:Generator_ColumnPropNameInTable="RFIDNumColumn" msprop:Generator_UserColumnName="RFIDNum">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DateScanned" msprop:Generator_ColumnVarNameInTable="columnDateScanned" msprop:Generator_ColumnPropNameInRow="DateScanned" msprop:Generator_ColumnPropNameInTable="DateScannedColumn" msprop:Generator_UserColumnName="DateScanned" type="xs:dateTime" />
              <xs:element name="AssetNo" msprop:Generator_ColumnVarNameInTable="columnAssetNo" msprop:Generator_ColumnPropNameInRow="AssetNo" msprop:Generator_ColumnPropNameInTable="AssetNoColumn" msprop:Generator_UserColumnName="AssetNo" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:RFIDScanHistory" />
      <xs:field xpath="mstns:RFIDNum" />
      <xs:field xpath="mstns:DateScanned" />
    </xs:unique>
  </xs:element>
</xs:schema>